
LIBWD_DIR ?= $(CURDIR)/libwd

CFLAGS_WD = -I$(LIBWD_DIR)/libwdbase/include -I$(LIBWD_DIR)/libwdcap/include \
            -I$(LIBWD_DIR)/libwddial -Wall -I$(LIBWD_DIR)/libcjson -I$(LIBWD_DIR)/libwdplatform \
	    -I$(LIBWD_DIR)/libwdudpspeed/

LDFLAGS_WD = -L$(LIBWD_DIR) -lwd -pthread -lm

#kafka support
ifeq ($(USE_KAFKA),1)
LDFLAGS_WD += $(LIBWD_DIR)/librdkafka/$(HOST)/lib/librdkafka.a  -lz -ldl
ifneq ($(OS),android)
LDFLAGS_WD += -lrt # for kafka
endif
endif

#https support
ifeq ($(HTTPS_SUPPORT),1)
LDFLAGS_WD += $(LIBWD_DIR)/wolfssl-3.11.0/$(HOST)/lib/libwolfssl.a -lm
LIBwolfssl_static = $(LIBWD_DIR)/wolfssl-3.11.0/$(HOST)/lib/libwolfssl.a -lm
endif

LIBwdbase_static = $(LIBWD_DIR)/libwdbase/libwdbase.a
LIBghttp_static = $(LIBWD_DIR)/libghttp/libghttp.a
LIBcjson_static = $(LIBWD_DIR)/libcjson/libcjson.a
